1. Field of the Invention
The present invention relates to telecommunications networks, and, in particular, to the detection of echo path changes in such networks.
2. Description of the Related Art
FIG. 1 shows a simplified block diagram of a near end 100 of a prior-art telecommunications network. In particular, FIG. 1 shows near end 100 for a first user who communicates with a second user located at a far end (not shown) of the network. As depicted in FIG. 1, near end 100 has two communication paths: (1) a lower path for receiving signals Rin generated at the far end of the network and (2) an upper path for communicating signals Sout to the far end. The far end may be implemented in a manner similar to that of near end 100, rotated by 180 degrees such that the far end receives signals via its upper path and communicates signals via its lower path.
Received signals Rin are routed to communications device 102 via hybrid 104, which may be implemented as a two-wire-to-four-wire converter that separates the upper and lower communication paths. Communications device 102 may be implemented as a land-line telephone, cell phone, or any other suitable communications device. Signals Sgen generated at communications device 102 are routed through hybrid 104 to echo canceller 106 (discussed below), which processes the signals and provides output signals Sout to the far end.
In generating signals at near end 100, unwanted echo may be introduced that diminishes the quality of the signals communicated to the far end. Generally, there are two types of echo that may be introduced: acoustic echo and hybrid echo (a.k.a., circuit echo or electric echo). Acoustic echo may be introduced when the loudspeaker of communications device 102 generates audio corresponding to signals Rin received from the far end and the audio is picked up by the microphone of the device. Hybrid echo may be introduced when there is an impedance mismatch in the hybrid that allows a portion of received signals Rin to be reflected back to the far end via the upper path.
The amount of echo in relation to received signal Rin may be described in terms of an echo return loss (ERL). For example, between hybrid 104 and echo canceller 106, the ERL may be quantified as the ratio of (i) the energy |Rin|2 of the far-end signal Rin to (ii) the energy of the far-end signal Rin that is present in the near-end signal (i.e., the energy of the corresponding echo) as shown in Equation (1):
                              ERL          i                =                                                                          R                                  in                  ,                  i                                                                    2                                                                            echo                i                                                    2                                              (        1        )            where subscript i denotes the ith iteration. In practice, the ERL may change during communications due to echo path changes (EPCs) that may result from, for example, changes in line impedance or signal routing. When an EPC occurs, the ratio of the energy |Rin|2 of the far-end signal Rin to the energy of the echo (i.e., the ERL) may change. On the other hand, when an EPC is not occurring, the ERL typically remains relatively constant. In this situation, as the energy |Rin|2 of the far-end signal Rin increases, the energy of the echo increases proportionately, and when the energy |Rin|2 of the far-end signal Rin decreases, the energy of the echo decreases proportionately.
When a call is initiated or when an EPC occurs, echo canceller 106 adapts to the new echo path so that it may effectively remove the new echo from input signal Sin. Adaptation is performed using an update loop comprising combiner 108, adaptive filter 110, and controller 112. Combiner 108 receives (1) an estimate of the echo from adaptive filter 110 and (2) input signal Sin from hybrid 104, and removes the estimated echo from input signal Sin to obtain output signal Sout. Controller 112 receives signals Rin, Sin, and Sout, and generates an estimate of the residual echo contained within Sout. Based on this residual echo estimate, controller 112 updates filter coefficients using an adaptive algorithm, such as a normalized-least-mean-squares (NLMS) algorithm. Adaptive filter 110 applies the updated filter coefficients to received signal Rin and outputs an updated estimate of the echo to combiner 108. This process is repeated, and, for each iteration, controller 112 attempts to step towards filter coefficients that, when applied to received signal Rin by adaptive filter 110, produce an echo estimate that results in output signal Sout having a residual echo of approximately zero. When the residual echo becomes approximately zero, echo canceller 106 has converged on an estimated echo that reflects the actual echo contained within input signal Sin.
The effectiveness of echo canceller 106 in canceling echo (i.e., in reducing echo whether or not the reduction is complete) may be described in terms of an echo return loss enhancement (ERLE). ERLE may be quantified as the ratio of (i) the energy of the echo input into echo canceller 106 to (ii) the energy of the residual echo output from echo canceller 106 as shown in Equation (2) below:
                              E          ⁢                                          ⁢          R          ⁢                                          ⁢          L          ⁢                                          ⁢                      E            i                          =                                                                          echo                i                                                    2                                                                            resid_echo                i                                                    2                                              (        2        )            Generally, echo cancellation becomes more effective as the proportion of echo energy to residual echo energy increases (i.e., the ERLE increases). When echo canceller 106 has converged on the echo, the ERLE will typically be very large because the residual echo energy, if any, will be small in proportion to the echo energy. If an EPC occurs after echo canceller 106 has converged on the echo, then the echo energy will generally change, and the residual echo may become comparable to or even larger than the new echo energy, resulting in a small ERLE value, which might be less than 1.
The ability of echo canceller 106 to converge on the actual echo may be affected by the presence of signals Sgen generated at communication device 102. A condition known as “double talk” occurs when both the near-end user and the far-end user are talking simultaneously so that input signal Sin includes signals corresponding to both the near-end user of device 102 (e.g., Sgen) and the far-end user (e.g., echo). In such a situation, combiner 108 outputs signal Sout, which comprises generated signal Sgen and residual echo. Controller 112 might have difficulty in differentiating between generated signal Sgen and the residual echo, thereby making it relatively difficult for echo canceller 106 to converge on the actual echo. In some instances, the presence of double talk might be counterproductive and might actually cause echo canceller 106 to diverge from the actual echo. Thus, when double talk is present, it may be desirable to inhibit adaptation of echo canceller 106 to prevent divergence.
Various control algorithms 112 may be implemented that (1) improve the ability of adaptive filter 110 to converge on the actual echo or (2) prevent adaptive filter 110 from diverging. One such control algorithm may adjust the size of the steps taken toward the estimated echo during adaptation. For example, during initial convergence, the algorithm may direct adaptive filter 110 to use a larger step size for more aggressive initial convergence. As convergence nears, the algorithm may direct adaptive filter 110 to use a smaller step size to reduce any possible steady-state error.
Another such control algorithm may be employed to detect the presence of double talk. When double talk is detected, adaptation of the echo canceller 106 may be inhibited to prevent divergence and the coefficients used just prior to inhibition may be used for echo cancellation.
Yet another such control algorithm may be employed to detect EPCs that occur after echo canceller 106 converges on the actual echo. When an EPC has been detected, the control algorithm may direct controller 112 to restart adaptation from a more aggressive mode to achieve relatively quick re-convergence. One implementation of an EPC detection algorithm, which uses parallel adaptive filtering, is discussed in Liu, “A Novel Adaptation Scheme in the NLMS Algorithm for Echo Cancellation,” IEEE Signal Processing Letters, Vol. 8, No. 1, January 2001, pp. 20-22, the teachings of which are incorporated herein by reference. Another implementation of an EPC detection algorithm, which uses correlation methods, is discussed in U.S. Pat. No. 6,305,034, the teachings of which are incorporated herein by reference.